***Figure 5: Total High-Level Trials Compared to Non-Violent Video Condition***


**Intensity**

*RVV
ttest highintensity_sum if (treatment == 1 | treatment == 3) & round == 1, by(treatment)
replace t_meanr_highint = r(mu_1)-r(mu_2) in 6
replace t_upperr_highint = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 6
replace t_lowerr_highint = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 6

*FVV
ttest highintensity_sum if (treatment == 2 | treatment == 3) & round == 1, by(treatment)
replace t_meanf_highint = r(mu_1)-r(mu_2) in 6
replace t_upperf_highint = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 6
replace t_lowerf_highint = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 6

anova highintensity_sum treatment if (treatment == 1 | treatment == 2) & round == 1
replace pvalue_highint = Ftail(e(df_m), e(df_r), e(F)) in 6


**Duration**

*RVV
ttest highduration_sum if (treatment == 1 | treatment == 3) & round == 1, by(treatment)
replace t_meanr_highdur = r(mu_1)-r(mu_2) in 6
replace t_upperr_highdur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 6
replace t_lowerr_highdur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 6

*FVV
ttest highduration_sum if (treatment == 2 | treatment == 3) & round == 1, by(treatment)
replace t_meanf_highdur = r(mu_1)-r(mu_2) in 6
replace t_upperf_highdur = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 6
replace t_lowerf_highdur = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 6

anova highduration_sum treatment if (treatment == 1 | treatment == 2) & round == 1
replace pvalue_highdur = Ftail(e(df_m), e(df_r), e(F)) in 6


**Convert p-values to three digits for graphs**

sort subject round
replace pvalue_highint = round(pvalue_highint,0.001)
replace pvalue_highint = pvalue_highint*1000
rename pvalue_highint pvalue_highintold
tostring pvalue_highintold,gen(pvalue_highint)
gen count = length(pvalue_highint)
replace count =  0 if pvalue_highint == "."
replace pvalue_highint =  "" if pvalue_highint == "."
replace pvalue_highint = "0.00" + pvalue_highint if count == 1
replace pvalue_highint = "0.0" + pvalue_highint if count == 2
replace pvalue_highint = "0." + pvalue_highint if count == 3
drop count

replace pvalue_highdur = round(pvalue_highdur,0.001)
replace pvalue_highdur = pvalue_highdur*1000
rename pvalue_highdur pvalue_highdurold
tostring pvalue_highdurold,gen(pvalue_highdur)
gen count = length(pvalue_highdur)
replace count =  0 if pvalue_highdur == "."
replace pvalue_highdur =  "" if pvalue_highdur == "."
replace pvalue_highdur = "0.00" + pvalue_highdur if count == 1
replace pvalue_highdur = "0.0" + pvalue_highdur if count == 2
replace pvalue_highdur = "0." + pvalue_highdur if count == 3
drop count


**Create the graph**

local pvalue_highint = pvalue_highint in 6

twoway  (bar t_meanr_highint x_r if _n == 6, barwidth(.5) color(gs8) lcolor(black) lwidth(vthin)) (rcap t_upperr_highint t_lowerr_highint x_r if _n == 6, lcolor(black)) (bar t_meanf_highint x_f if _n == 6, barwidth(.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_highint t_lowerf_highint x_f if _n == 6, lcolor(black)), xscale(lstyle(none)) xlabel(.35 " " 1 `""{bf:Total High-Intensity}" "{bf:Trials}" "{stSans:({it:p} = `pvalue_highint')}"' 1.65 " ",notick) ylabel(-2 -1 0 1 "+1" 2 "+2", nogrid notick labgap(2) labsize(small)) ytick(-2 -1 0 1 2) yline(0) name(hiintensity, replace) legend(region(lwidth(none)) order(1 "Real Violence" "Video (RVV)") rows(1) cols(1) ring(20) position(1) symxsize(4) symysize(4) size(small))  ytitle("Difference from Non-Violent Video (NVV) Group",orientation(vertical)) graphregion(margin(0 0 0 0))

local pvalue_highdur = pvalue_highdur in 6

twoway  (bar t_meanr_highdur x_r if _n == 6, barwidth(.5) color(gs8) lcolor(black) lwidth(vthin)) (rcap t_upperr_highdur t_lowerr_highdur x_r if _n == 6, lcolor(black)) (bar t_meanf_highdur x_f if _n == 6, barwidth(.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_highdur t_lowerf_highdur x_f if _n == 6, lcolor(black)), xscale(lstyle(none)) xlabel(.3 " " 1 `""{bf:Total High-Duration}" "{bf:Trials}" "{stSans:({it:p} = `pvalue_highdur')}"' 1.7 " ",notick) yscale(off) yline(0) ylabel(,nogrid) name(hiduration, replace) legend(region(lwidth(none)) order(3 "Fictional Violence" "Video (FVV)") rows(1) cols(1) ring(20) position(11) symxsize(4) symysize(4) size(small))  ytitle("Difference from Non-Violent Video Group",orientation(vertical)) graphregion(margin(0 0 0 0))

addplot hiduration: pcarrowi 1.5 1 1.4 1.225 (9) "Standard errors " -1 .3 -.075  .325  (6) "NVV baseline", lcolor(black) norescaling  msize(vtiny) lwidth(vthin) legend(region(lwidth(none)) order(3 "Fictional Violence" "Video (FVV)" ) rows(1) cols(1) ring(20) position(11) symxsize(4) symysize(4) size(small))

graph combine hiintensity hiduration, iscale(1) ycommon imargin(-1.05) cols(2) xsize(1.5) ysize(1) name(hivalue, replace)  note(" " " " "{space 12}{bf: Note:} {it:p}-values refer to a one-way ANOVA between the RVV and FVV, testing the hypothesis that {&mu}{subscript:RVV} = {&mu}{subscript:FVV}.")

graph export Graphs/figure-5.pdf, replace

graph drop hiintensity hiduration
